{% extends "base.html" %} {% block main %}
<div id="form"></div>
<script type="text/babel">
    class Signin extends React.Component {

        render() {
            return
                <form action="/signin" method="post">
                    <div>
                        <label>Name</label>
                        <input type="text" name="name" placeholder="你的昵称" value="{{name}}" onChange={e=>{console.log(e.target.value)}} />
                        <p>Your user name  {{name}}</p>
                    </div>
                    <button type="submit">Sign In</button>
                </form>;
        }
    }
    ReactDOM.render( <Signin />,
            document.getElementById('form')
    );
</script>
{% endblock %}